package com.rockcent.mall.lib.dto;

import com.rockcent.common.domain.DtoEntity;
import com.rockcent.mall.lib.domain.MerchantOrderItem;
import com.rockcent.mall.lib.domain.enumclass.MallOrderStatus;
import com.rockcent.mall.lib.domain.enumclass.MallSourceType;
import com.rockcent.mall.lib.domain.enumclass.OrderType;
import com.rockcent.mall.lib.domain.enumclass.PaymentMethod;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by zhangjh on 2016/10/28.
 */
public class MallOrderDto extends DtoEntity {

    //平台id
    private Long mallId;
    //总金额
    private BigDecimal totalAmount;
    //折扣金额
    private BigDecimal discountTotalAmount;
    //源总金额
    private BigDecimal oriTotalAmount;
    //订单号
    private String orderNum;
    ///收货地址
    private String shoppingAddress;
    //收货人
    private String shoppingMan;
    //收货人电话号码
    private String shoppingManPhone;
    //订单状态 WAIT_PAYING(\"待支付\"), CANCEL(\"取消\"), PAYED(\"已支付\"), WAIT_SHIPPED(\"等待发货\"), SHIPPED(\"已发货\"), SHOP_PICKUP(\"到店自提\"), PART_SHOP_PICKUP(\"部分到店自提\"), CONFIRM_PICKUP(\"确认自提\"), CONFIRM(\"已确认\"), WAIT_USE(\"待使用\"), PART_USE(\"部分使用\"), USED(\"已使用\"), FINISHED(\"已完成\"), APPLY_REJECT(\"申请退货\"), FINISHED_REJECT(\"已完成退货\"), APPLY_REFUND(\"申请退款\"), FINISHED_REFUND(\"已完成退款\")
    private MallOrderStatus status;
    //订单类型 GOODS(\"实物商品\"), SERVICE(\"到店服务\")
    private OrderType orderType;
    //备注
    private String remark;
    //客户id
    private Long customerId;
    //应用类型：平台或商家
    private MallSourceType mallSourceType;
    //分销市场服务费
    private BigDecimal marketServiceRate;
    //实收金额
    private BigDecimal actualAmount;
    //跨站服务费
    private String platformServiceFeeRates;
    //支付流水号
    private String paymentTransaction;
    //礼包名称
    private String giftName;
    //礼包id
    private Long giftId;
    //礼包数量
    private Long giftNum;
    //支付URL
    private String payUrl;
    //分销码
    private String salesCode;
    //礼包商家ID
    private Long merchantId;
    //礼包商铺名称
    private String merchantName;
    //商品列表 礼包 或 产品
    private List productList;
    //订单所含产品
    private List<MerchantOrderItem> merchantOrderItemList;
    //SHOP_PICKUP("到店自提"), SHIPPING("物流"), SHOP_PICKUP_AND_SHIPPING("物流及到店自取")
    private String productShoppingType;
    // 允许的支付方式
    private List<PaymentMethod> allowPaymentMethodList;

    //包含商家订单
    private List<MerchantOrderDto> merchantOrderDtoList;

    private BigDecimal shareFee;
    //开始时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String beginDate;

    //结束时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String endDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createDate;

    //支付方式
    private String paymentMethod;

    public List<MerchantOrderItem> getMerchantOrderItemList() {
        return merchantOrderItemList;
    }

    public void setMerchantOrderItemList(List<MerchantOrderItem> merchantOrderItemList) {
        this.merchantOrderItemList = merchantOrderItemList;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getDiscountTotalAmount() {
        return discountTotalAmount;
    }

    public void setDiscountTotalAmount(BigDecimal discountTotalAmount) {
        this.discountTotalAmount = discountTotalAmount;
    }

    public BigDecimal getOriTotalAmount() {
        return oriTotalAmount;
    }

    public void setOriTotalAmount(BigDecimal oriTotalAmount) {
        this.oriTotalAmount = oriTotalAmount;
    }

    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getShoppingAddress() {
        return shoppingAddress;
    }

    public void setShoppingAddress(String shoppingAddress) {
        this.shoppingAddress = shoppingAddress;
    }

    public String getShoppingMan() {
        return shoppingMan;
    }

    public void setShoppingMan(String shoppingMan) {
        this.shoppingMan = shoppingMan;
    }

    public String getShoppingManPhone() {
        return shoppingManPhone;
    }

    public void setShoppingManPhone(String shoppingManPhone) {
        this.shoppingManPhone = shoppingManPhone;
    }

    public MallOrderStatus getStatus() {
        return status;
    }

    public void setStatus(MallOrderStatus status) {
        this.status = status;
    }

    public OrderType getOrderType() {
        return orderType;
    }

    public void setOrderType(OrderType orderType) {
        this.orderType = orderType;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public MallSourceType getMallSourceType() {
        return mallSourceType;
    }

    public void setMallSourceType(MallSourceType mallSourceType) {
        this.mallSourceType = mallSourceType;
    }

    public BigDecimal getMarketServiceRate() {
        return marketServiceRate;
    }

    public void setMarketServiceRate(BigDecimal marketServiceRate) {
        this.marketServiceRate = marketServiceRate;
    }

    public BigDecimal getActualAmount() {
        return actualAmount;
    }

    public void setActualAmount(BigDecimal actualAmount) {
        this.actualAmount = actualAmount;
    }

    public String getPlatformServiceFeeRates() {
        return platformServiceFeeRates;
    }

    public void setPlatformServiceFeeRates(String platformServiceFeeRates) {
        this.platformServiceFeeRates = platformServiceFeeRates;
    }

    public String getPaymentTransaction() {
        return paymentTransaction;
    }

    public void setPaymentTransaction(String paymentTransaction) {
        this.paymentTransaction = paymentTransaction;
    }

    public String getGiftName() {
        return giftName;
    }

    public void setGiftName(String giftName) {
        this.giftName = giftName;
    }

    public Long getGiftId() {
        return giftId;
    }

    public void setGiftId(Long giftId) {
        this.giftId = giftId;
    }

    public Long getGiftNum() {
        return giftNum;
    }

    public void setGiftNum(Long giftNum) {
        this.giftNum = giftNum;
    }

    public String getPayUrl() {
        return payUrl;
    }

    public void setPayUrl(String payUrl) {
        this.payUrl = payUrl;
    }

    public String getSalesCode() {
        return salesCode;
    }

    public void setSalesCode(String salesCode) {
        this.salesCode = salesCode;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public List getProductList() {
        return productList;
    }

    public void setProductList(List productList) {
        this.productList = productList;
    }

    public String getProductShoppingType() {
        return productShoppingType;
    }

    public void setProductShoppingType(String productShoppingType) {
        this.productShoppingType = productShoppingType;
    }

    public List<MerchantOrderDto> getMerchantOrderDtoList() {
        return merchantOrderDtoList;
    }

    public void setMerchantOrderDtoList(List<MerchantOrderDto> merchantOrderDtoList) {
        this.merchantOrderDtoList = merchantOrderDtoList;
    }

    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public List<PaymentMethod> getAllowPaymentMethodList() {
        return allowPaymentMethodList;
    }

    public void setAllowPaymentMethodList(List<PaymentMethod> allowPaymentMethodList) {
        this.allowPaymentMethodList = allowPaymentMethodList;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public BigDecimal getShareFee() {
        return shareFee;
    }

    public void setShareFee(BigDecimal shareFee) {
        this.shareFee = shareFee;
    }

    @Override
    public String toString() {
        return "MallOrderDto{" +
                "mallId=" + mallId +
                ", totalAmount=" + totalAmount +
                ", discountTotalAmount=" + discountTotalAmount +
                ", oriTotalAmount=" + oriTotalAmount +
                ", orderNum='" + orderNum + '\'' +
                ", shoppingAddress='" + shoppingAddress + '\'' +
                ", shoppingMan='" + shoppingMan + '\'' +
                ", shoppingManPhone='" + shoppingManPhone + '\'' +
                ", status=" + status +
                ", orderType=" + orderType +
                ", remark='" + remark + '\'' +
                ", customerId=" + customerId +
                ", mallSourceType=" + mallSourceType +
                ", marketServiceRate=" + marketServiceRate +
                ", actualAmount=" + actualAmount +
                ", platformServiceFeeRates='" + platformServiceFeeRates + '\'' +
                ", paymentTransaction='" + paymentTransaction + '\'' +
                ", giftName='" + giftName + '\'' +
                ", giftId=" + giftId +
                ", giftNum=" + giftNum +
                ", payUrl='" + payUrl + '\'' +
                ", salesCode='" + salesCode + '\'' +
                ", merchantId=" + merchantId +
                ", merchantName='" + merchantName + '\'' +
                ", productList=" + productList +
                ", merchantOrderItemList=" + merchantOrderItemList +
                ", productShoppingType='" + productShoppingType + '\'' +
                ", allowPaymentMethodList=" + allowPaymentMethodList +
                ", merchantOrderDtoList=" + merchantOrderDtoList +
                ", shareFee=" + shareFee +
                ", beginDate='" + beginDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", createDate='" + createDate + '\'' +
                ", paymentMethod='" + paymentMethod + '\'' +
                '}';
    }
}
